<%--
  Created by IntelliJ IDEA.
  User: 15813315065
  Date: 2020/7/6
  Time: 16:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <script src="js/jquery.min.js"></script>
</head>
<body>
<div>
    订单编号：${oNo}
</div>
<div>
<%--    订单金额：${price}--%>
</div>

微信扫码支付:<img src="http://localhost:8080/getImg">
</body>
<script>

    <%--$("img").attr("src",`codewxPay?urlCode=${urlCode}`)--%>

    // $("img").attr("src",'getImg')
    setInterval(function checkPay() {
        // window.location.href = "checkPay";
        $.ajax({
            url: 'checkPay',
            type: 'GET',
            dataType: 'json',
            data: {
            },
            success: function (_data) {
                console.log(_data.code)
                if (_data.code > 0) {
                    window.location.href = "showOrder.jsp";
                } else {
                    // window.location.href = "index.jsp";
                }
            }
        })
    },3000)



</script>
</html>
